-- GENERATED SPELL FOR [Lady Keira Berrybuck] --


function spell0_17007(pUnit, Event) --@Cleanse,n/a--
pUnit:FullCastSpellOnTarget(29380,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_17007', 627, 1)
end

function spell1_17007(pUnit, Event) --@Divine Shield,Self--
pUnit:FullCastSpellOnTarget(29382,pUnit)
pUnit:RegisterEvent('Sorts_17007', 10266, 1)
end

function spell2_17007(pUnit, Event) --@Greater Blessing of Might,n/a--
pUnit:FullCastSpellOnTarget(29381,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_17007', 585, 1)
end

function spell3_17007(pUnit, Event) --@Holy Light,Heal--
pUnit:FullCastSpellOnTarget(29383,pUnit)
pUnit:RegisterEvent('Sorts_17007', 4500, 1)
end

function spell4_17007(pUnit, Event) --@Holy Light,Heal--
pUnit:FullCastSpellOnTarget(29562,pUnit)
pUnit:RegisterEvent('Sorts_17007', 1500, 1)
end

function Sorts_17007(pUnit, Event)
local choix_sorts_17007 = math.random(0, 4)
if choix_sorts_17007 == 0 then
pUnit:RegisterEvent('spell0_17007', 1, 1)
end
if choix_sorts_17007 == 1 then
pUnit:RegisterEvent('spell1_17007', 1, 1)
end
if choix_sorts_17007 == 2 then
pUnit:RegisterEvent('spell2_17007', 1, 1)
end
if choix_sorts_17007 == 3 then
pUnit:RegisterEvent('spell3_17007', 1, 1)
end
if choix_sorts_17007 == 4 then
pUnit:RegisterEvent('spell4_17007', 1, 1)
end
end

function mob17007_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_17007', math.random(1500, 3000), 1)
end

function mob17007_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob17007_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob17007_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(17007, 1, 'mob17007_Action')
RegisterUnitEvent(17007, 2, 'mob17007_Leave')
RegisterUnitEvent(17007, 3, 'mob17007_Kill')
RegisterUnitEvent(17007, 4, 'mob17007_Die')
